package com.easycms.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.easycms.base.AbstractBaseDao;
import com.easycms.common.Pager;
import com.easycms.controller.backend.CmsAlbumController;
import com.easycms.entity.CmsUser;
import com.easycms.entity.CmsUserAlbumAttach;
import com.easycms.entity.CmsUserExt;
import com.easycms.service.CmsUserAlbumAttachService;

@Service
public class CmsUserAlbumAttachServiceImpl extends AbstractBaseDao<CmsUserAlbumAttach, Integer> implements CmsUserAlbumAttachService{

	@Override
	public Pager<CmsUserAlbumAttach> findByKey(Integer albumID, int showPages, int pageSize) {
		String operate = ".findAlbumAttachByKey";
		Map<String, Object> maps = new HashMap<String, Object>();
		maps.put("showPages", showPages);
		maps.put("pageSize", pageSize);
		maps.put("albumID", albumID);
		return findByKey(maps, operate);
	}

	@Override
	public Pager<CmsUserAlbumAttach> findAllByPage(int showPages, int pageSize) {
		return findByPage(showPages, pageSize);
	}
	
	@Override
	public void saveAlbumAttach(CmsUserAlbumAttach albumAttach) {
		save(albumAttach);
	}
}
